taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

patch-charities-{charity_id}.rst (925B)


      1 .. http:PATCH:: /charities/{charity_id}
      2 
      3   Modify a charity.
      4   Only allowed if the request comes with the administrator bearer token.
      5 
      6   **Request:** ``CharityRequest``
      7 
      8   **Response:**
      9 
     10   :http:statuscode:`200 OK`:
     11     The update succeeded. The response body is empty.
     12 
     13   :http:statuscode:`400 Bad Request`:
     14     The request was malformed. For example, ``max_per_year`` must not be
     15     smaller than the current ``receipts_to_date`` of the charity.
     16 
     17   :http:statuscode:`401 Unauthorized`:
     18     Missing or invalid bearer token.
     19 
     20   :http:statuscode:`403 Forbidden`:
     21     The request did not contain an accepted administrator bearer token in its header.
     22 
     23   :http:statuscode:`404 Not Found`:
     24     The charity ID is unknown to the Donau.
     25 
     26   **Details:**
     27 
     28   The request body has the same shape as :ts:type:`CharityRequest` used by
     29   :http:POST:`/charities`. All fields are required and will replace the stored
     30   values of the charity.